import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'home',
            component: resolve => require(['@v/Home.vue'], resolve),
            meta: {
                requireAuth: true
            }
        }, {
            path: '/login',
            name: 'login',
            component: resolve => require(['@v/login.vue'], resolve),
            meta: {
                requireAuth: true
            },
            children: [{
                    path: 'inputLogin',
                    name: 'inputLogin',
                    component: resolve => require(['components/inputLogin.vue'], resolve),
                    meta: {
                        title: {
                            requireAuth: true
                        }
                    }
                }, {
                    path: 'qrLogin',
                    name: 'qrLogin',
                    component: resolve => require(['components/qrLogin.vue'], resolve),
                    meta: {
                        title: {
                            requireAuth: true
                        }
                    }
                },
                {
                    path: 'resetPassword',
                    name: 'resetPassword',
                    component: resolve => require(['components/resetPassword.vue'], resolve),
                    meta: {
                        title: {
                            requireAuth: true
                        }
                    }
                }
            ]
        }, {
            path: '/room',
            name: 'room',
            component: resolve => require(['@v/room.vue'], resolve),
            meta: {
                requireAuth: true
            }
        }, {
            path: '/historyCourseList',
            name: 'historyCourseList',
            component: resolve => require(['@v/historyCourseList.vue'], resolve),
            meta: {
                requireAuth: true
            }
        }, {
            path: '/studentSide',
            name: 'studentSide',
            component: resolve => require(['@v/studentSide.vue'], resolve),
            meta: {
                requireAuth: true
            }
        }, {
            path: '/video',
            name: 'video',
            component: resolve => require(['@v/video.vue'], resolve),
            meta: {
                requireAuth: true
            }
        }

    ]
})